﻿@model SampleTryouts.Models.Product[]

@{
    ViewBag.Title = "Demo Array";    
}

@if (Model.Length > 0)
{ 
    <table>
        <thead>
            <tr>
                <th>Product Name</th>
                <th>Price</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var p in Model)
            { 
                <tr>
                    <td>@p.Name</td>
                    <td>@p.Price</td>
                </tr>
            }

        </tbody>
    </table>
}
else
{
    <h3>No Product Data :-(</h3>
}
